/**
 * 富文本比较大, 而且只有部分组件会用到, 所以这里单独抽取出来
 */
import { compile, h } from "vue"
import { Tinymce } from "/@/components/Tinymce"

/**
 * 渲染富文本
 */
export const renderTinymce = ({ model, field }) => {
  return h(Tinymce, {
    showImageUpload: false,
    height: 300,
    value: model[field],
    onChange: (value: string) => {
      model[field] = value
    },
  })
}
